ad.sum.adj          	      package:adGol        		        R Documentation

Sums the Adjacent Elements in a Binary Matrix

Description:

	Sums all the adjacent elements (maximun of eight) of a certain position in a matrix.

Usage:

	ad.sum.adj(mat, i, j)

	## No default is specified

Arguments:

	mat:  A numerical matrix.

	i:  The line of the position of interest in the matrix.

	j:  The column of the position of interest in the matrix.

Details:

	This function sums all adjacent elements of the specified position in the matrix 'mat', it is carefull on the edges and borders.

Value:

	This function returns a number corresponding to the sum of adjacent elements. It may also return 'NA' if the specified position does not belong to the matrix.

Author(s):

	Ademar Marques Lacerda Filho
